<script src="components/com_info_leader/public/uploadlib/jquery.min.js" type="text/javascript"></script>
<script src="components/com_info_leader/public/uploadlib/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="components/com_frmessage/public/uploadlib/uploadify.css"/>
<script type="text/javascript" src="../media/system/js/jQuery.vietvang.validate.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$('#adminForm').validate({
			});
		});
</script>
<form action="index.php?option=com_info_leader" method="post" id="adminForm" name="adminForm" class="adminform" enctype="multipart/form-data">
        <table style="width: 100%;" border=0>
            <tr>
            <td colspan="5">
            <fieldset  id="adminformfieldset" style="width: 90%;">
            
        <table style="width: 100%;" border=0>
            <tr style="visibility:hidden">
                <td style="width:165px"></td>
                <td style="width:200px;"></td>
                <td style="width:80px;"></td>
                <td style="width:200px;"></td>
                <td style="width:480px;"></td>
            </tr>

            <tr style="vertical-align:top;">
                <td class="fcalendar">指導員コード<span class="err">※</span></td>
                <td style="line-height: 24px;" ><input vvName="number" data_required="true" type="text" class="inputbox medium" id="jformCOCH_CD" name="jform[COCH_CD]"/><span name="msg_error" ></span></td>
                <!-- <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:20%;">指導者システムコード</td>
                <td style="text-align: left;width:20%;"><input type="text" readonly="true" class="inputbox medium" id="jformCOCH_CODE" name="jform[COCH_CODE]" value="<?php echo $this->coch_code; ?>"/></td> -->
             
            </tr>
            <tr style="vertical-align:top;">
                <td class="fcalendar">指導員氏名<span class="err">※</span></td>
                <td><input type="text" data_required="true" vvName="fullname" class="inputbox medium" id="jformCOCH_NAME" name="jform[COCH_NAME]"/><span name="msg_error" ></span></td>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;line-height:30px;">カナ</td>
                <td style="text-align: left;"><input type="text" class="inputbox medium" id="jformCOCH_KANA" name="jform[COCH_KANA]"/></td>
            </tr>
            <tr style="vertical-align:top;">
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;line-height:30px;">所属センターコード<span class="err">※</span></td>
                <td >
                    <input type="text" readonly=""  id="jformOCBA_TOWN_CODE" name="jform[COCH_OCBA_CODE]" class="inputbox medium" />
                    <a href="#" id="link_ocba_town_code" style="line-height: 30px;" class="line-height28;">検索</a>
                </td>
                <td class="fcalendar">職業</td>
                <td >
                    <select class="medium" id="jformCOCH_JOBM_CODE" name="jform[COCH_JOBM_CODE]">
                        <?php
                            foreach($this->listjob as $value){
                          ?>
                          <option value="<?php echo $value->JOBM_CODE;?>">
                          <?php echo $value->JOBM_NAME; ?></option>
                          <?php
                            }
                          ?>
                    </select>
                </td>
            </tr>
            <tr style="vertical-align:top">
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;line-height:30px;">性別</td>
                <td>
                    <select class="medium" id="jformCOCH_SEX" name="jform[COCH_SEX]">
                        <option value="1">男性</option>
                        <option value="2">女性</option>
                    </select>
                </td>
                <td class="fcalendar" >生年月日</td>
                <td>
                    <?php echo JHtml::calendar('', 'jform[COCH_BDATE]', 'jformCOCH_BDATE');?>
                    <span name="msg_error"></span>
                </td>
                
                
            </tr>
            <tr style="vertical-align:top;">
                <td class="fcalendar">登録年月日</td>
                <td >
                    <?php echo JHtml::calendar('', 'jform[COCH_RDATE]', 'jformCOCH_RDATE');?>
                    <span name="msg_error"></span>   
                </td>
                <td></td>
                
                
            </tr>
             <tr style="vertical-align:top;">
                <td class="fcalendar">更新年月日</td>
                <td>
                    <?php echo JHtml::calendar('', 'jform[COCH_MDATE]', 'jformCOCH_MDATE');?>
                    <span name="msg_error"></span>
                </td>
                
            </tr>
             <tr style="vertical-align:top;">
                <td class="fcalendar">有効期限年月日</td>
                <td>
                    <?php echo JHtml::calendar('', 'jform[COCH_LDATE]', 'jformCOCH_LDATE');?>
                    <span name="msg_error"></span>
                </td>
                <td></td>
                <td><label class="err">※印は入力必須項目です。</label></td>
                
            </tr>
             <tr style="vertical-align:top;">
                <td class="fcalendar">抹消年月日</td>
                <td>
                    <?php echo JHtml::calendar('', 'jform[COCH_EDATE]', 'jformCOCH_EDATE');?>
                    <span name="msg_error"></span>
                 
                </td>
                
            </tr>
             <tr style="vertical-align:top;">
                <td class="fcalendar">抹消処理年月日</td>
                <td>
                    <?php echo JHtml::calendar('', 'jform[COCH_DDATE]', 'jformCOCH_DDATE');?>
                    <span name="msg_error"></span>
                </td>
                
            </tr>
            
            </table>
    </fieldset>
            </td></tr>
            
            
            <tr>
            <td colspan="5">
            <fieldset  id="adminformfieldset" style="width: 90%;">
        <legend>自宅</legend>
        <table style="width: 100%;" border=0>
            
             <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:15%;vertical-align: top;line-height: 30px;">郵便番号</td>
                <td style="width:200px;">
                    <input type="text" vvName="postcode" class="inputbox medium" id="jformCOCH_POST" name="jform[COCH_POST]"/>
                    <span name="msg_error"></span>
                </td>
                
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:20%;vertical-align: top;line-height: 30px;">都道府県</td>
                <td style="text-align: left;width:220px;vertical-align:top">
                    <select class="medium" id="jformCOCH_PRE1" name="jform[COCH_PRE1]">
                        <option value='0'>選択してください</option>
                        <?php
                            foreach($this->listpref as $value){
                          ?>
                          <option value="<?php echo $value->PREF_CODE;?>">
                          <?php echo $value->PREF_NAME; ?></option>
                          <?php
                            }
                          ?>
                    </select>
                </td>
                <td style="text-align: left;width:20%;"></td>
            </tr>
             <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">住所</td>
                <td colspan="4"><input type="text" class="inputbox sizexx" id="jformCOCH_ADD1" name="jform[COCH_ADD1]"/></td>
                
            </tr>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">マンション・ビル名</td>
                <td colspan="4"><input type="text" class="inputbox sizexx" id="jformCOCH_BUI1" name="jform[COCH_BUI1]"/></td>
                
            </tr>
            <tr style="vertical-align:top">
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;vertical-align: top;line-height: 30px;vertical-align: top;line-height: 30px;">自宅電話番号</td>
                <td>
                    <input type="text" vvName="phone" class="inputbox medium" id="jformCOCH_TEL" name="jform[COCH_TEL]"/>
                    <span name="msg_error"></span>
                </td>
                
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;vertical-align: top;line-height: 30px;vertical-align: top;line-height: 30px;">自宅FAX</td>
                <td>
                    <input type="text" vvName="fax" class="inputbox medium" id="jformCOCH_FAX" name="jform[COCH_FAX]"/>
                    <span name="msg_error"></span>
                </td>
            </tr>
            <tr style="vertical-align:top">
                <td class="td_small">自宅メールアドレス</td>
                <td>
                    <input type="text" vvName="email" class="inputbox medium" id="jformCOCH_MAIL" name="jform[COCH_MAIL]"/>
                    <span name="msg_error"></span>
                </td>

                <td style="text-align: right;font-size: 1.091em;padding-right:5px;line-height:30px;">自宅メールアドレス メルマガ登録</td>


                <td class="text-align-left" ><label id="mailf"></label></td>
                <td></td>
                
            </tr>
            <tr style="vertical-align:top">
                <td class="td_small">携帯メールアドレス</td>
                <td>
                    <input type="text" vvName="email" class="inputbox medium" id="jformCOCH_MAIK" name="jform[COCH_MAIK]"/>
                    <span name="msg_error"></span>
                </td>
                

                <td style="text-align: right;font-size: 1.091em;padding-right:5px;line-height:30px;">携帯メールアドレス メルマガ登録</td>

                <td class="text-align-left" ><label id="mailf"></label></td>
                <td></td>
                
            </tr>
            
            </table>
    </fieldset>
            </td></tr>
            
            
            <tr>
            <td colspan="5">
            <fieldset  id="adminformfieldset" style="width: 90%;">
        <legend>勤務先</legend>
        <table style="width: 100%;" border=0>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:15%;" >勤務先名</td>
                <td colspan="4"><input type="text" class="inputbox medium" id="jformCOCH_NAMW" name="jform[COCH_NAMW]"/></td>
              
            </tr>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:15%;">所属部署</td>
                <td style="width:209px;"><input type="text" class="inputbox medium" id="jformCOCH_UNIT" name="jform[COCH_UNIT]" /> </td>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:20%;">役職</td>
                <td style="text-align: left;width:220px;"><input type="text" class="inputbox medium" id="jformCOCH_POSI" name="jform[COCH_POSI]"/></td>
                <td style="width:20%;"></td>
            </tr>
            <tr style="vertical-align:top">
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;width:15%;vertical-align: top;line-height: 30px;">郵便番号</td>
                <td>
                    <input type="text" vvName="postcode" class="inputbox medium" id="jformCOCH_POSW" name="jform[COCH_POSW]"/>
                    <span name="msg_error"></span>
                </td>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;line-height:30px">都道府県</td>
                <td>
                    <select class="medium" id="pref2" name="jform[COCH_PRE2]">
                        <option value='0'>選択してください</option>
                        <?php
                            foreach($this->listpref as $value){
                          ?>
                          <option value="<?php echo $value->PREF_CODE;?>">
                          <?php echo $value->PREF_NAME; ?></option>
                          <?php
                            }
                          ?>
                    </select>
                </td>
                <td></td>
            </tr>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">勤務先住所</td>
                <td colspan="4"><input type="text" class="inputbox sizexx" id="jformCOCH_ADD2" name="jform[COCH_ADD2]"/></td>
             
            </tr>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">マンション・ビル名</td>
                <td colspan="4"><input type="text" class="inputbox sizexx" id="jformCOCH_BUI2" name="jform[COCH_BUI2]"/></td>
             
            </tr>
            <tr style="vertical-align:top">
                <td class="td_small">勤務先電話番号</td>
                <td>
                    <input type="text" vvName="phone" class="inputbox medium" id="jformCOCH_TELW" name="jform[COCH_TELW]"/>
                    <span name="msg_error"></span>
                </td>
                <td class="td_small">勤務先FAX</td>
                <td>
                    <input type="text" vvName="fax" class="inputbox medium" id="jformCOCH_FAXW" name="jform[COCH_FAXW]"/>
                    <span name="msg_error"></span>
                </td>
                
            </tr>
            <tr style="vertical-align:top">
                <td class="td_small">勤務先メールアドレス</td>
                <td>
                    <input type="text" vvName="email" class="inputbox medium" id="jformCOCH_MAIW" name="jform[COCH_MAIW]"/>
                    <span name="msg_error"></span>
                </td>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;line-height: 30px;">勤務先メールアドレス　メルマガ登録</td>
                <td><label></label></td>
                <td></td>
               
            </tr>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">勤務形態 </td>
                <td colspan="4">
                    <table>
                        <tr>
                            <td><input type="radio" checked="true" id="jform_showtitle0" name="jform[COCH_WOKF]" value="1" /></td>
                            <td><label for="jform_showtitle0">常勤</label></td>
                            <td><input type="radio" id="jform_showtitle1" name="jform[COCH_WOKF]" value="0" /></td>
                            <td><label for="jform_showtitle1">非常勤</label> </td>
                        </tr>
                    </table>     
                </td>
            </tr>
            <tr style="vertical-align:top" >
                <td class="fcalendar">写真</td>
                <td colspan="2">
                    <input type="file" runat="server" class="inputbox" id="jformCOCH_IMG" name="jformCOCH_IMG"  />
                    <span style="font-size: 1.091em;color:blue">(推奨される画像の縦横比は「1:1」です。)</span>                    
                    <input type="hidden" name="jform[COCH_IMG_NEW]" id="value_COCH_IMG" value="" />
                    
                </td>
                <td colspan="2" id="preview" >
                    <img  id="showimg"/>
                </td >
                
                
                                <div id="div_img" style="display:none"> 
                                     <img id="img" src="" width="120" style="border:1px solid #dadada" /> 
                                 </div> 
            
            </tr>
            <!--
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">人材バンク</td>
                <td colspan="4"><input type="text" class="input_big" id="jformCOCH_HUM1" name="jform[COCH_HUM1]"/>
                <input type="text" class="input_big" id="jformCOCH_HUM2" name="jform[COCH_HUM2]"/>
                <input type="text" class="input_big" id="jformCOCH_HUM3" name="jform[COCH_HUM3]"/></td>
                
            </tr>
            <tr>
                <td></td>
               <td colspan="4"><input type="text" class="input_big" id="jformCOCH_HUM4" name="jform[COCH_HUM4]"/>
                <input type="text" class="input_big" id="jformCOCH_HUM5" name="jform[COCH_HUM5]"/>
                <input type="text" class="input_big" id="jformCOCH_HUM6" name="jform[COCH_HUM6]"/></td>
            </tr>
            -->
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;vertical-align: top;line-height:30px">人材バンク</td>
                <td colspan="4">
                <table style="width: 50%;" border=0>
                <tr>
                    <?php
                            $i = 0;
                            foreach($this->human as $key=>$value){
                                $i++;
                        ?>
                        
                                <td style="width: 3%;">
                                    <input style="float: right;" type="checkbox" name="chh<?php echo $value->HUMAN_CODE; ?>" id="chh<?php echo $value->HUMAN_CODE; ?>" value="<?php echo $value->HUMAN_NAME; ?>" <?php if(isset($this->list['chh'.$value->HUMAN_CODE])){ echo 'checked="checked"'; } ?>  />
                                </td>
                                <td style="width:  20%;">
                                    <label for="chh<?php echo $value->HUMAN_CODE; ?>"><?php echo $value->HUMAN_NAME; ?></label>
                                </td>
                        
                        <?php
                                if($i == 3){
                                    $i = 0;
                                    echo "</tr><tr>"; 
                                }    
                            }
                        ?>
                    </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">指導者会</td>
                <td colspan="4"> 
                    <table border='0' style="width:36%;">
                        <tr>
                            <td style="width: 1%;"><input style="float: right;"  type="checkbox" value="登録" id="jformCOCH_REGI" name="cbCOCH_REGI"/></td>
                            <td style="width:  5%;"><label for="jformCOCH_REGI">登録</label></td>
                                                        
                            <td style="width: 10%;font-size: 1.091em;text-align:right;">指導者会名</td>
                            <td style="width:  20%;"><input type="text" class="inputbox medium" id="jformCOCH_LDME" name="jform[COCH_LDME]"/></td>                         
                        </tr>
                                                
                    </table>
                </td>
                
                
                
               
            </tr>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">事業協力</td>
                <td colspan="4">
                    <table style="width: 50%;" border='0'>
                        <tr>
                        <?php
                            $i = 0;
                            foreach($this->lkdt as $key=>$value){
                                $i++;
                        ?>
                        
                                <td style="width: 3%;">
                                    <input style="float: right;" type="checkbox" name="chl<?php echo $value->LKDT_CODE; ?>" id="chl<?php echo $value->LKDT_CODE; ?>" value="<?php echo $value->LKDT_NAME; ?>" <?php if(isset($this->list['chl'.$value->LKDT_CODE])){ echo 'checked="checked"'; } ?>  />
                                </td>
                                <td style="width:  20%;">
                                    <label for="chl<?php echo $value->LKDT_CODE; ?>"><?php echo $value->LKDT_NAME; ?></label>
                                </td>
                        
                        <?php
                                if($i==3){
                                    $i = 0;
                                    echo "</tr><tr>"; 
                                }    
                            }
                        ?>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr >
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;vertical-align:top;line-height:30px;">B&G事業担当</td>
                <td colspan="4">
                    <table style="width: 565px;" border="0">
                        <tr style="vertical-align:top">
                            <td class="td_small">自</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSS1]', 'jformCOCH_BUSS1');?><span name="msg_error"></span></td>
                            <td style="text-align: center;font-size: 1.091em;line-height:30px">~</td>
                            <td class="td_small">至</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSE1]', 'jformCOCH_BUSE1');?><span name="msg_error"></span> </td>
                        </tr>
                    </table>
                </td>
                <!-- <td>
                    <label>自</label></?php echo JHtml::calendar('', 'jform[COCH_BUSS1]', 'jformCOCH_BUSS1');?>
                   <label class="from-to-edit">~</label>
                    <span name="msg_error"></span>
                </td>
                <td colspan="3">
                    <label>至</label></?php echo JHtml::calendar('', 'jform[COCH_BUSE1]', 'jformCOCH_BUSE1');?>
                    <span name="msg_error"></span>   
                </td>
                -->
            </tr>
            <tr>
                <td></td>
                <td colspan="4">
                    <table style="width: 565px;">
                        <tr style="vertical-align:top">
                            <td class="td_small">自</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSS2]', 'jformCOCH_BUSS2');?><span name="msg_error"></span></td>
                            <td style="text-align: center;font-size: 1.091em;line-height:30px">~</td>
                            <td class="td_small">至</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSE2]', 'jformCOCH_BUSE2');?><span name="msg_error"></span> </td>
                        </tr>
                    </table>
                </td>
                <!-- <td>
                    <label>自</label></?php echo JHtml::calendar('', 'jform[COCH_BUSS2]', 'jformCOCH_BUSS2');?>
                    <label class="from-to-edit">~</label>
                    <span name="msg_error"></span>   
                </td>
                <td colspan="3">
                    <label>至</label></?php echo JHtml::calendar('', 'jform[COCH_BUSE2]', 'jformCOCH_BUSE2');?>
                    <span name="msg_error"></span>   
                </td>
                -->
            </tr>
            <tr>
                <td></td>
                <td colspan="4">
                    <table style="width: 565px;" border=0">
                        <tr style="vertical-align:top">
                            <td class="td_small">自</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSS3]', 'jformCOCH_BUSS3');?><span name="msg_error"></span></td>
                            <td style="text-align: center;font-size: 1.091em;line-height:30px">~</td>
                            <td class="td_small">至</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSE3]', 'jformCOCH_BUSE3');?><span name="msg_error"></span> </td>
                        </tr>
                    </table>
                </td>
                <!-- <td>
                    <label>自</label></?php echo JHtml::calendar('', 'jform[COCH_BUSS3]', 'jformCOCH_BUSS3');?>
                   <label class="from-to-edit">~</label>
                    <span name="msg_error"></span>    
                </td>
                <td colspan="3">
                    <label>至</label></?php echo JHtml::calendar('', 'jform[COCH_BUSE3]', 'jformCOCH_BUSE3');?>
                    <span name="msg_error"></span>   
                </td>
                -->
            </tr>
            <tr>
                <td></td>
                <td colspan="4">
                    <table style="width: 565px;" border=0">
                        <tr style="vertical-align:top">
                            <td class="td_small">自</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSS4]', 'jformCOCH_BUSS4');?><span name="msg_error"></span></td>
                            <td style="text-align: center;font-size: 1.091em;line-height:30px">~</td>
                            <td class="td_small">至</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSE4]', 'jformCOCH_BUSE4');?><span name="msg_error"></span> </td>
                        </tr>
                    </table>
                </td>
                <!-- <td>
                    <label>自</label></?php echo JHtml::calendar('', 'jform[COCH_BUSS4]', 'jformCOCH_BUSS4');?>
                    <label class="from-to-edit">~</label>
                    <span name="msg_error"></span>  
                </td>
                <td colspan="3">
                    <label>至</label></?php echo JHtml::calendar('', 'jform[COCH_BUSE4]', 'jformCOCH_BUSE4');?>
                    <span name="msg_error"></span>    
                </td>
                 -->
            </tr>
            <tr>
                <td></td>
                <td colspan="4">
                    <table style="width: 565px;" border=0">
                        <tr style="vertical-align:top">
                            <td class="td_small">自</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSS5]', 'jformCOCH_BUSS5');?><span name="msg_error"></span></td>
                            <td style="text-align: center;font-size: 1.091em;line-height:30px">~</td>
                            <td class="td_small">至</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSE5]', 'jformCOCH_BUSE5');?><span name="msg_error"></span> </td>
                        </tr>
                    </table>
                </td>
                <!-- <td>
                    <label>自</label></?php echo JHtml::calendar('', 'jform[COCH_BUSS5]', 'jformCOCH_BUSS5');?>
                    <label class="from-to-edit">~</label>
                    <span name="msg_error"></span>  
                </td>
                <td colspan="3">
                    <label>至</label></?php echo JHtml::calendar('', 'jform[COCH_BUSE5]', 'jformCOCH_BUSE5');?>
                    <span name="msg_error"></span>   
                </td>
                 -->
            </tr>
            <tr>
                <td></td>
                <td colspan="4">
                    <table style="width: 565px;" border=0>
                        <tr style="vertical-align:top">
                            <td class="td_small">自</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSS6]', 'jformCOCH_BUSS6');?><span name="msg_error"></span></td>
                            <td style="text-align: center;font-size: 1.091em;line-height:30px">~</td>
                            <td class="td_small">至</td>
                            <td style="width: 200px;"><?php echo JHtml::calendar('', 'jform[COCH_BUSE6]', 'jformCOCH_BUSE6');?><span name="msg_error"></span> </td>
                        </tr>
                    </table>
                </td>
                <!-- <td>
                    <label>自</label></?php echo JHtml::calendar('', 'jform[COCH_BUSS6]', 'jformCOCH_BUSS6');?>
                    <label class="from-to-edit">~</label>
                    <span name="msg_error"></span>  
                </td>
                <td colspan="3">
                    <label>至</label></?php echo JHtml::calendar('', 'jform[COCH_BUSE6]', 'jformCOCH_BUSE6');?>
                    <span name="msg_error"></span>    
                </td>
                 -->
            </tr>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">特記事項</td>
                <td colspan="4"><textarea class="inputbox sizex" id="jformCOCH_COMM" name="jform[COCH_COMM]"></textarea></td>

                
            </tr>
            <tr>
                <td style="text-align: right;font-size: 1.091em;padding-right:5px;">備考（財団記入欄）</td>

                <td colspan="4"><textarea class="inputbox sizex" id="jformCOCH_NOTE" name="jform[COCH_NOTE]"></textarea></td>

                
            </tr>
            
            <!--
            <tr>
                <td>指導員資格リス<br>ト（内部用）</td>
                <td colspan="4"><textarea class="inputbox bigxxx" id="jformCOCH_FLST" name="jform[COCH_FLST]" ></textarea></td>
                
            </tr>
            <tr>
                <td>指導員資格リス<br>ト（センター用）</td>
                <td colspan="4"><textarea class="inputbox bigxxx" id="jformCOCH_CLST" name="jform[COCH_CLST]"></textarea></td>
                <td></td>
            </tr>
            -->
            </table>
    </fieldset>
            </td></tr>
        </table>
        <div>
		<input type="hidden" name="task" value="" />
        
        </div>
    
</form>

<?php $timestamp = time();?>
<script>

    
  
    $(function() {
        $('#jformCOCH_IMG').uploadify({
            'formData'     : {
    			'timestamp' : '<?php echo $timestamp;?>',
    			'token'     : '<?php echo md5('unique_salt' . $timestamp);?>',
                'COCH_CODE' : '<?php echo HelperBG::getIDAuto('coch','COCH_CODE') ?>'
    		},
            'multi'    : false,
            'removeTimeout' : 1,
            'fileSizeLimit' : '125MB',
            'buttonText' : '画像を選択してください。',
            'width'    : 170,
            'swf'      : 'components/com_info_leader/public/uploadlib/uploadify.swf',
            'uploader' : 'components/com_info_leader/public/uploadlib/uploadify.php',           
            'onUploadSuccess' : function(file, data, response) {
                
                /* show image */
                $('#preview').html(
                '<img style="width:20%" id="showimg" src="uploads/images/com_info_leader/'+data+'" />');
                $('#value_COCH_IMG').val(data);
            }
            // Put your options here
        });
    });
    
    /* remove anh chon khi click cancel */
    Joomla.submitbutton = function(task){
        if(task == 'cancel'){
                var image_name_old = jq('#value_COCH_IMG').val();
                if(image_name_old != ''){
                    jq.ajax({
                      url: 'index.php?option=com_info_leader&task=removeImage'
                        +'&image_name='+image_name_old,
                      context: document.body
                    }).done(function(data ) {
                        
                    });
                }
        }
           
        Joomla.submitform(task, document.getElementById('adminForm'));
           
     }
   
    /* ready */
    jq(document).ready(function() {
        jq("#jformCOCH_IMG-button").attr('style','width:160px');
                
        var zb;
        // show a dialog box when clicking on a link
        //show a dialog box: town search
        jq('#link_ocba_town_code').bind('click', function(e) {
            e.preventDefault();
            zb = new jq.Zebra_Dialog('', {
                source:  {'ajax': 'index.php?option=com_info_leader&views=bg&task=popup_town&tmpl=component'},
                height: 800,
                width: 550,
                title:  'センター検索',
                type:  '',
                buttons:  [
                    {caption: 'キャンセル', callback: function() {}}
                    //{caption: '閉じる', callback: function() { alert('"Yes" was clicked')}},
                        
                ]                                  
                               
            });
        });
        
        
        jq(".link_town_code").live("click",function(){
            var id = jq(this).html();
            jq("#jformOCBA_TOWN_CODE").val(id);
            zb.close();
        });
});
    
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BDATE",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BDATE",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_RDATE",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_RDATE",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_MDATE",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_MDATE",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_LDATE",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_LDATE",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_EDATE",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_EDATE",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_DDATE",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_DDATE",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
    
    //calendar ODATE
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSS1",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSS1",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSS2",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSS2",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSS3",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSS3",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSS4",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSS4",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSS5",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSS5",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSS6",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSS6",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSE1",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSE1",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSE2",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSE2",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSE3",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSE3",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSE4",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSE4",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSE5",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSE5",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
    window.addEvent('domready', function() {Calendar.setup({
        	// Id of the input field
        	inputField: "jformCOCH_BUSE6",
        	// Format of the input field
        	ifFormat: "%Y/%m/%d",
        	// Trigger for the calendar (button ID)
        	button: "jformCOCH_BUSE6",
        	// Alignment (defaults to "Bl")
        	align: "Bl",
        	singleClick: true,
        	firstDay: 0
    	});
    
    });
                
    
</script>